#include "MyCustomAction.h"

//=================================MyMessgae============================================
MyMessage::MyMessage()
{
	strcpy(m_buff, "init message!");
	m_number.SetNumber_Int(1000);
}

MyMessage::~MyMessage()
{
	//SAFE_DELETE(m_pLuaFunction);
	//SAFE_RELEASE(m_pLuaObj);
}

void MyMessage::ShowVec3(MyNumber* v[], int len)
{
	//printf("%f %f %f", v[0], v[1], v[2]);
	for (int i = 0; i < len; i++)
	{
		printf("v[%d] : %d\n", i, v[i]->m_Inumber);
	}
	printf("copy the value to MyMessage's m_number\n");
	v[2] = &m_number;
}

//void MyMessage::ShowStringArray(const char* const arr[], int len)
//{
//	for (int i = 0; i < len; i++)
//	{
//		printf("v[%d] : %s\n", i, arr[i]);
//	}
//	printf("Print arr[0] is : gogogog\n");
//}

void MyMessage::ShowArray(MyTemplateArray<float>& value)
{
	unsigned int len = value.size();
	float* f = value.data();
	for (unsigned int i = 0; i < len; ++i)
	{
		printf("show Array:%f\r\n", f[i]);
	}
}